import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/Layout/Index.vue'
import Login from '@/views/Login/Index.vue'
import Home from '@/views/Home/Home.vue'
// import store from '@/store'



Vue.use(VueRouter)

export const baseRoutes = [
  {
    path: '/',
    component: Layout,
    meta: {
      title: '首页',
      isLogin: true,//是否需要登录
    },
    children: [
      {
        path: '/',
        name: 'home',
        component: Home,
        meta: {
          title: '首页'
        },
      },
    ]
  },
]

const routes = [
  {
    path: '/Login',
    name:'login',
    component: Login,
  }
]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})



export default router
